import React from 'react';
// import type {Node} from 'react';
import {Text, View, StyleSheet} from 'react-native';

const CreateModalTip = ({isTip, value}) => {
  if (isTip) {
    return (
      <View style={styles.modalView}>
        <Text style={styles.modalViewText}>{value}</Text>
      </View>
    );
  } else {
    return null;
  }
};

const styles = StyleSheet.create({
  modalView: {
    position: 'absolute',
    width: 100,
    height: 40,
    backgroundColor: 'rgba(0,0,0,0.7)',
    left: '50%',
    top: '50%',
    bottom: 0,
    right: 0,
    zIndex: 99,
    marginLeft: -50,
    marginTop: -20,
    borderRadius: 10,
    justifyContent: 'center',
    alignItems: 'center',
  },
  modalViewText: {
    color: '#fff',
    fontSize: 14,
  },
});
export default CreateModalTip;
